//
//  CALayer+Additions.m
//  yuimall_Iphone
//
//  Created by Gang.Wang on 12-4-26.
//  Copyright (c) 2012年 yuike. All rights reserved.
//

#import "CALayer+Additions.h"

@implementation CALayer (Additions)
- (void)moveToFront {
    CALayer *superlayer = self.superlayer;
    [self removeFromSuperlayer];
    [superlayer addSublayer:self];
}

- (void) setIntFrame:(CGRect) frame
{
    frame.origin.x = (int)(frame.origin.x + 0.5);
    frame.origin.y = (int)(frame.origin.y + 0.5);
    frame.size.width = (int)(frame.size.width + 0.5);
    frame.size.height = (int)(frame.size.height + 0.5);
    [self setFrame:frame];
}

@end
